package com.tang.customview;

import android.graphics.Color;
import android.graphics.Paint;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import com.tang.customview.util.DensityUtil;
import com.tang.customview.wedgit.HonourAbilityView;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        HonourAbilityView abilityView = (HonourAbilityView) findViewById(R.id.credit_view);
        abilityView.setDataCount(6)
                .setLineColor(Color.WHITE)
                .setLineStrokeWidth(DensityUtil.dp2px(this, 1.5f))
                .setDotColor(Color.RED)
                .setDotRadius(DensityUtil.dp2px(this, 3.5f))
                .setDotStrokeWidth(DensityUtil.dp2px(this, 1.5f))
                .setCoverColor(Color.GRAY)
                .setCoverStrokeWidth(DensityUtil.dp2px(this, 2.5f))
                .setTextSize(DensityUtil.dp2px(this, 15f))
                .setTextColor(Color.WHITE)
                .setCenterTextSize(DensityUtil.dp2px(this, 28f))
                .setDatas(new float[]{0.62f, 0.92f, 0.29f, 0.45f, 0.82f, 0.74f})
                .setTitles(new String[]{"APPLE", "BOOK", "CAT", "DOT", "EARTH", "FOX"})
                .setDotPaintStyle(Paint.Style.STROKE);
    }
}
